import React, { useState, FC, ReactElement } from 'react';

import { aa } from './html/typings';

import Top from './html/Top';
import List from './html/List';

const App: FC = (): ReactElement => {
  let [list, setList] = useState<aa[]>([])
  const addlist = (item: aa): void => {
    setList((list: aa[]): aa[] => [...list, item])

  }
  return (
    <div>
      <Top setList={addlist} />
      <List list={list} />
    </div>
  );
}

export default App;
